package cn.matezk.things.broker.service;

import cn.hutool.json.JSONObject;

import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

public interface MqttAuthService {
    JSONObject register(String productId, String deviceName) throws InvalidAlgorithmParameterException, NoSuchPaddingException, IllegalBlockSizeException, NoSuchAlgorithmException, BadPaddingException, InvalidKeyException;
    boolean auth(String clientId, String userName, String password) throws NoSuchAlgorithmException, InvalidKeyException;
}
